package com.cskaoyan.mapper;

import com.cskaoyan.bean.Cart;
import com.cskaoyan.bean.CartExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CartMapper {
    long countByExample(CartExample example);

    int deleteByExample(CartExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Cart record);

    int insertSelective(Cart record);

    List<Cart> selectByExample(CartExample example);

    Cart selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Cart record, @Param("example") CartExample example);

    int updateByExample(@Param("record") Cart record, @Param("example") CartExample example);

    int updateByPrimaryKeySelective(Cart record);

    int updateByPrimaryKey(Cart record);


    Double[] selectPriceAll(Integer userid);


    List<Integer> selectGoodTypeByUserId(@Param("userId") Integer userId, @Param("deleted") Integer deleted, @Param("checked") Integer checked);

    Double[] selectPriceAll();


    Double[] selectPriceChecked();

    int updatecheckedById(@Param("id") Integer id,@Param("bo") Boolean bo);

    Boolean selectChecked(@Param("id")Integer id);


    int updateNumberById(@Param("id")Integer id,@Param("number") Integer number);

    int updatecheckedByIdGroup(@Param("id") Integer id, @Param("bo")Boolean checked);

    int deleteByPid(Integer id);

    Cart selectByproductId(Integer productId);


    long countCartNumber(Integer roleId);
}